<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
  <meta name="viewport" content="initial-scale=1.0">
  <title>Sheet order</title>
  <script src="../../../polymer.js"></script>
  <script src="../../../tools/test/htmltest.js"></script>
  <script src="../../../node_modules/chai/chai.js"></script>
  <link rel="import" href="x-sheets.html">
  <style>
    div {
      font-size: 10px;
    }
  </style>
</head>
<body>
  <x-sheets></x-sheets>
  <script>
    document.addEventListener('WebComponentsReady', function() {
      var xSheets = document.querySelector('x-sheets');
      
      function test(node, color) {
        var computedColor = getComputedStyle(node).backgroundColor;
        chai.assert.equal(computedColor, color, 'computed color matches expected color');
      }
      
      test(xSheets.$.red, 'rgb(255, 0, 0)');
      test(xSheets.$.blue, 'rgb(0, 0, 255)');
      test(xSheets.$.yellow, 'rgb(255, 255, 0)');
      done();
    });
  </script>
</body>
</html>
